Developer Documentation

QuickTime 4 API Documentation

Programming With QuickTime VR

| Previous | Chapter Contents | Chapter Top |

Imaging Procedures

Your application can define prescreen and back buffer imaging procedures that are called when an image is done being drawn to the prescreen buffer used by QuickTime VR or at certain established times for a back buffer.

MyImagingCompleteProc

You can define a procedure to access QuickTime VR's prescreen buffer.

pascal OSErr MyImagingCompleteProc (QTVRInstance qtvr, SInt32 refCon);
qtvr
An instance of a QuickTime VR movie.
refCon
The reference constant specified in the call to QTVRSetPrescreenImagingCompleteProc that installed this procedure.
function result
A result code.

DESCRIPTION

Your MyImagingCompleteProc function is called whenever QuickTime VR is finished drawing an image into the prescreen buffer associated with the movie specified by the qtvr parameter. When your function is called, the drawing environment is set up so that you can draw directly into the current graphics world. Once your function returns, QuickTime VR copies the prescreen buffer to the final destination.

SPECIAL CONSIDERATIONS

If the value of the kQTVRImagingDirectDraw imaging property of the specified movie is true , then images are computed and drawn directly to the final destination without first being drawn into the prescreen buffer maintained by QuickTime VR. If your application has installed a prescreen buffer imaging completion procedure, QuickTime VR temporarily overrides the setting of the kQTVRImagingDirectDraw property and calls your MyImagingCompleteProc function after drawing into the prescreen buffer.

SEE ALSO

Use QTVRSetPrescreenImagingCompleteProc to install a prescreen buffer imaging completion procedure. See Listing 2-10 for a sample prescreen buffer imaging completion procedure.

MyBackBufferImagingProc

You can define a procedure to access QuickTime VR's back buffer.

pascal OSErr MyBackBufferImagingProc (
                     QTVRInstance qtvr,
                     Rect *drawRect,
                     UInt16 areaIndex,
                     UInt32 flagsIn,
                     UInt32 *flagsOut,
                     SInt32 refCon);
qtvr
An instance of a QuickTime VR movie.
drawRect
The rectangle, in local coordinates of the graphics world, of the area of interest.
areaIndex
The index, in the array of area of interest structures whose address was passed to QTVRSetBackBufferImagingProc , of the area of interest.
flagsIn
On entry, a set of bit flags that specify the event or operation that caused your procedure to be called, as well as other information about the state of the back buffer when your procedure is called. See "Back Buffer Imaging Procedure Flags" for a description of the available flags.
flagsOut
On exit, a set of bit flags that indicate what actions you performed in your procedure. See "Back Buffer Imaging Procedure Flags" for a description of the available flags.
refCon
The reference constant specified in the call to QTVRSetBackBufferImagingProc that installed this procedure.
function result
A result code.

DESCRIPTION

Your MyBackBufferImagingProc function is called at the times specified by the flags parameter to the call to QTVRSetBackBufferImagingProc that installed that function as a back buffer imaging procedure. When your function is called, the drawing environment is set up so that you can draw directly into the current graphics world.

If the area of interest wraps around the end of the back buffer, the rectangle specified by the drawRect parameter is in the coordinates of an intermediate buffer that is copied into the actual back buffer when your procedure returns.

You can call QTVRRefreshBackBuffer in your back buffer imaging procedure to refresh the current rectangle (that is, the rectangle specified by the drawRect parameter).

SEE ALSO

Use QTVRSetBackBufferImagingProc to install a back buffer imaging procedure.

 


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top |